<include file="Public/head"/>
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<script src="http://img1.isou365.cn/paimai/yunying/js/city.js" type="text/javascript"></script>
<style>
    .xuanzhe {margin-top: 0px;}
    .xuanzhe ul li{margin-bottom: 5px;}
    .xuanzhe ul li span {text-align: left;}
    .xuanzhe ul li .menDao1{width:300px;}
    .xuanzhe ul li .menDao1 a{display:block;background:#cecece;color:#303030;float:left;width:36px; text-align:center;height:20px; line-height:20px; cursor:pointer;}
    .xuanzhe ul li .menDao1 .menHover{ background:#20ab4f;color:#fff;}
    .xuanzhe .lift-truck{width:280px;padding:10px;display:block; background:#e1e1e1;border-radius:5px;margin-left:60px;margin-top:-10px;}
    .xuanzhe .lift-truck #taker_phone,.xuanzhe .lift-truck #taker_sex,.xuanzhe .lift-truck #taker_card,.xuanzhe .lift-truck #take_car_num{width:280px; display:block;height:30px; line-height:30px; text-align:left;}
    .xuanzhe .lift-truck span em{float:left; display:block;width:60px; text-align:right;}
    .yt_total{height:50px;line-height: 50px;width: 60%;border-top:1px solid #ccc;margin: 3% 0 0 3%;text-align:left;}
    .remarks{width: 100%;height: auto; margin-top: 20px; }
    .remarks span{display: block;width: 90px;float: left;line-height: 65px;font-size:14px;}
    .remarks textarea{border: 1px solid #c8c8c8;  float: left;  height: 65px;  padding: 5px;  resize: none;  width: 745px;}
</style>
<include file="Public/common_header"/>
<div class="mian">
    <include file="Public/sidebar" menu="cwgl.tcsk"/>
    <div class="mianR">
        <h3 class="yonghu"> 基本信息</h3>
        <div class="chezhu-xinxi">
            <div class="xinxi-conter xinxi-conter1" style="background: none;border: none">
                <h4 class="order_no">拍卖单号：<b>{$detail.order_no}</b></h4>
            </div>
            <br/>
            <div class="xinxi-conter xinxi-conter1">
                <h4>车商信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>车商姓名</em><em class="name-text">{$detail.contact_person}</em>
                        <em>车商电话</em><em class="dian-hua">{$detail.contact_mobile}</em>
                    </li>
                </ul>
            </div>
            <br/>

            <div class="xinxi-conter xinxi-conter1">
                <h4>车辆信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>车型</em><em class="name-text">{$detail.model}</em>
                        <em>排放标准</em><em class="dian-hua">{$detail.emission}</em>
                    </li>

                    <li class="clearfix">
                        <em>初登日期</em><em class="name-text">{$detail.first_reg_date}</em>
                        <em>颜色</em><em class="dian-hua">{$detail.car_color}</em>
                    </li>
                    <li class="clearfix">
                        <em>表显里程</em><em class="name-text">{$detail.pointer_mileage}万公里</em>
                        <em>车况级别</em><em class="name-text">{$detail.composite_state}{$detail.accident_level}</em>
                    </li>
                    <li class="clearfix">
                        <em>车辆注册地</em><em class="name-text">{$detail.reg_city}</em>
                        <em>车架号</em><em class="name-text">{$detail.vin}</em>
                    </li>
                    <li class="clearfix">
                        <em>过户限制</em><em class="name-text">{$transfer_type[$car_detail['transfer_limit']]}</em>
                        <em>车牌号</em><em class="name-text">{$detail.plate_prefix}{$detail.plate_suffix}</em>
                    </li>
                    <li class="clearfix">
                        <em>渠道来源</em><em class="name-text">
                        <if condition="$car_detail.comefrom neq ''">
                            <?php if(empty($car_detail['comefrom_url'])):?>
                            <?php echo $show_from[$car_detail['comefrom']];?>
                            <?php else: ?>
                            <a href="{$car_detail.comefrom_url}" target="_blank" rel="noreferrer"><?php echo $show_from[$car_detail['comefrom']];?></a>
                            <?php endif;?>
                            <else/>
                            未知
                        </if>
                    </em>
                        <em>所在地</em><em class="name-text">{$detail.location_area_name}</em>
                    </li>
                </ul>
            </div>
            <br/>
            <div class="xinxi-conter xinxi-conter1">
                <h4>争议信息
                    <if condition="$detail.refund_type eq 1">
                        （我方违约）
                        <elseif condition="$detail.refund_type eq 2" />
                        （车商违约）
                    </if>
                </h4>
                <ul>
                    <li class="clearfix">
                        <em>仲裁员</em><em class="name-text">{$detail.issue_done_emp}</em>
                        <em>仲裁员电话</em><em class="name-text">{$detail.issue_done_mobile}</em>
                    </li>
                    <li class="clearfix">
                        <em>{$detail.issue_type_name}金额</em><em class="name-text">{$detail.cut_down_price}元</em>
                        <em>仲裁时间</em><em class="name-text">{$detail.issue_done_time}</em>
                    </li>
                    <li class="clearfix">
                        <em>备注</em><em class="name-text" style="width: 845px;">{$detail.remark}</em>
                    </li>
                </ul>
            </div>
        </div>

        <h3 class="yonghu">退款明细</h3>
        <div class="xuanzhe">
            <ul>
                <li class="clearfix">
                    <span>车商付款：</span>
                    <span style="width: 120px;">{$detail.pay_amount}元</span>
                </li>
                <li class="clearfix">
                    <span>{$detail.issue_type_name}金额：</span>
                    <span style="width: 120px;">{$detail.cut_down_price}元</span>
                </li>
            </ul>
            <div class="yt_total">
                <b style="font-size:16px;">应退总额</b>
                 {$detail.formula}
                <strong style="color: red;font-size:16px;">
                    {$detail.refund_amount_total}元
                </strong>
            </div>
        </div>

        <div class="remarks clearfix">
            <span>备注</span>
            <textarea name="refund_remark" id="refund_remark"></textarea>
        </div>

        <div class="yongBtn">
            <input type="hidden" name="id" value="{$detail.id}">
            <input type="hidden" name="refund_type" value="{$detail.refund_type}">
            <input type="hidden" name="refund_amount" value="{$detail.refund_amount_total}">
            <input type="submit" value="确认退款" class="queding"/>
            <input class="quxiao" type="submit" value="返回" onclick="history.back();">
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    $('.queding').on('click',function(){
        var refund_id = $("input[name='id']").val();
        var refund_amount = $("input[name='refund_amount']").val();
        var refund_remark = $("#refund_remark").val();
        var params = {
            'refund_id': refund_id,
            'refund_amount': refund_amount,
            'refund_remark': refund_remark
        }
        $.post('/DealerRefund/do_refund_deal', params, function (data) {
            if (data.code == '200') {
                btn_alert(data.msg, 2000, function () {
                    window.location.href = document.referrer;
                });
            } else {
                shibai_alert(data.msg);
                return false;
            }
        }, 'json');
    });
</script>
<include file="Public/foot" />